import matplotlib.pyplot as plt
import pandas as pd
from cycler import cycler
import numpy as np
df=pd.read_excel('城镇单位就业人员年平均工资.xlsx',sheet_name='按登记注册类型',index_col=0)
df.sort_index(axis=1,inplace=True)
plt.rcParams['figure.figsize']=(12,8)
plt.rcParams['font.sans-serif']='SimHei'
plt.title('折线图')
plt.xlabel('年份')
plt.ylabel('平均工资/元')
x=df.columns
for index in df.index:
    plt.plot(x,df.loc[index])
plt.legend(df.index)
plt.show()
